﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ExtAspNet;

namespace HY.WEB.SA
{
    public partial class sch_view : PageBase
    {
        public string us, whe = "", path = "";           
        protected void Page_Load(object sender, EventArgs e)
        {
            us = Session["ID"].ToString();
            if (!IsPostBack)
            {
                if (!String.IsNullOrEmpty(Request["sid"]))
                {
                     hidsid.Text = Request["sid"].Trim();                
                }
                if (!String.IsNullOrEmpty(Request["schbh"]))
                {
                    hidsid.Text = Request["schbh"].Trim();
                    hidsid.Text = BLL.Bllbase.get_val("school", "sid", "schbh='" + hidsid.Text + "'");
                }

                fill2();
            }

        
        }

        

        void fill2()
        {
        
        BLL.SC.schools S = new BLL.SC.schools();
 
          DataTable d=  S.GetList("sid="+hidsid.Text).Tables[0];
          hidsid.Text = d.Rows[0]["sid"].ToString().Trim();

          lblbh.Text = d.Rows[0]["schbh"].ToString().Trim();
          txtschool.Text = d.Rows[0]["schname"].ToString().Trim();

          txtperson.Text = d.Rows[0]["person"].ToString().Trim();

          txttel.Text = d.Rows[0]["stel"].ToString().Trim();

          txtfax.Text = d.Rows[0]["sfax"].ToString().Trim();
          txtemail.Text = d.Rows[0]["semail"].ToString().Trim();

          txtaddress.Text = d.Rows[0]["saddress"].ToString().Trim();
          txtpost.Text = d.Rows[0]["spost"].ToString().Trim();

          txtwebsite.Text = d.Rows[0]["sweb"].ToString().Trim();


          date1.Text = d.Rows[0]["rdate"].ToString().Trim();

          txttelm.Text = d.Rows[0]["mtel"].ToString().Trim();
          txtqq.Text = d.Rows[0]["qq"].ToString();
          txtmsn.Text = d.Rows[0]["msn"].ToString();


          txtmemo.Text = BLL.BllHtml.LostHTML(Server.HtmlDecode(d.Rows[0]["memo"].ToString().Trim()));
          }

       

    }
}